#
# GNUmakefile for Galois field library
#
#

SRCS = gf_w4.c gf_w8.c gf_w16.c gf_timing.c gf_unit.c
HDRS = gf.h gf_int.h
EXECUTABLES = gf_unit
CFLAGS = -O3 -msse4 -DINTEL_SSE4 -lc
LDFLAGS = -O3 -msse4
RM = /bin/rm -f

OBJS = $(addsuffix .o, $(basename $(SRCS)))

DEFAULT = gf_unit

default: $(DEFAULT)

all: $(OBJS)

gf_unit: gf_unit.o gf_w4.o gf_w8.o gf_w16.o gf_timing.o

clean:
	$(RM) $(OBJS)

spotless: clean
	$(RM) *~ $(EXECUTABLES)

gf_timing.o: gf_int.h
gf_w4.o: gf_int.h gf.h
gf_w8.o: gf_int.h gf.h
gf_w16.o: gf_int.h gf.h
gf_unit.o: gf.h
